﻿using Microsoft.EntityFrameworkCore;

namespace StudentManage.Model
{
    public static class ModelBuilderExtensions
    {
        public static void Seed(this ModelBuilder modelBuilder)
        {
           modelBuilder.Entity<Student>().HasData(
                new Student
                {
                    Id = 1,
                    Name = "肖康",
                    ClassName = ClassNameEnum.SecondGrade,
                    Email = "xiao@qq.com",
                },
                new Student
                {
                    Id = 2,
                    Name = "小红",
                    ClassName = ClassNameEnum.FirstGrade,
                    Email = "xiaohong@qq.com",
                }
            );
        }


    }
}
